<template>
  <div class="cont" ref="fullscreenContainer">
    <Myhead title="公司公告" />
    <div class="w">
     
      <div class="left"  @click="handleJump">
        <vue-seamless-scroll :data="this.content" class="seamless-warp">
        <h3 class="title">{{this.title}}</h3>
        <div class="time">{{this.time}}</div>
  
        <div class="content" v-html="this.content">
 
        </div>
      </vue-seamless-scroll>
      </div>
 
    </div>
    <Myfoot />
  </div>
</template>

<script>
import Myhead from "./components/my-head.vue";
import Myfoot from "./components/my-foot.vue";
import {NoticeList} from "@/api"
export default {
  data() {
    return {
      content:'',
      title:'',
      time:''
    };
  },
  methods: {
    getNoticeList(){
      NoticeList().then(res=>{

          this.time = res.data.data[0].createTime
          this.content = res.data.data[0].noticeContent
          this.title = res.data.data[0].noticeTitle
      })
  },
  handleJump() {
      console.log('1111');
            this.$router.push('/project')
        },
        redirectToPage() {
    // 使用setTimeout()函数设置定时器，参数1表示要等待的时间（单位为毫秒），参数2表示要执行的函数或者代码片段
    var noticetime = setTimeout(() => {
      // 这里写入需要执行的跳转逻辑，比如路由导航到其他页面
      this.$router.push('/ailist')
    }, 30000); // 3000ms = 3s，表示等待3秒后再执行跳转操作
  }

  },
  components: {
    Myhead,
    Myfoot,
  },

  mounted() {
    this.getNoticeList()
    this.redirectToPage()
//     setInterval(() => {
//   this.$router.push('/project')
// }, 30000);
  },
  computed: {

  },
};
</script>

<style lang="scss" scoped>
.seamless-warp{
  
  overflow: hidden;
  height: 80vh;
}
.w {
  display: flex;
  width: 9.8333rem;
  margin: 0 auto;
  justify-content: space-between;
}
.left {
  width: 9.8333rem;
  height: 80vh;
  margin-top: 0.1823rem;
  border-radius: 0.0208rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(0.1615rem);
  box-shadow: 0px 0.0521rem 0.0781rem 0px rgba(3, 30, 62, 0.3);
  font-size: 0.3333rem;
  padding: 0.1563rem;
}
.title {
  text-align: center;
}
.time {
  font-size: 0.1458rem;
}
.content{
  height: 100vh;
  line-height: .4167rem;
  font-size: .2344rem;
  // background-color: aqua;
  margin-top: .1563rem;
  overflow: hidden;
// text-align: center;
  // overflow: auto;
}


</style>
